package com.javasea.spring.proxy.cglibproxy;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *@ClassName Controller
 *@Description TODO
 *@Author longxiaonan@163.com
 *@Date 2022/3/17 0017 15:14
 */
@Slf4j
@RestController
public class DemoController {

    @GetMapping("/test")
    public void test(){
        IUserDao userDao = Application.context.getBean("userDao", IUserDao.class);
        String res = userDao.queryUserInfo();
        // 测试结果：你被代理了 queryUserInfo
        log.info("测试结果：{}", res);
    }

}
